<template>
<!-- m-footer displayflex -->
  <ul class="m-footer displayflex" id="vFooter">
    <router-link to="/driver" tag="li" class="flex1" v-bind:class="{active:status === 1}">
      <i class="iconfont icon-index"></i>
      <p>首页</p>
    </router-link>
    <router-link to="/driver/allOrder" tag="li" class="flex1" v-bind:class="{active:status === 2}">
      <i class="iconfont icon-order"></i>
      <p>订单</p>
    </router-link>
    <router-link to="/user" tag="li" class="flex1" v-bind:class="{active:status === 3}">
      <i class="iconfont icon-my"></i>
      <p>我的</p>
    </router-link>
  </ul>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: "footBar",
  props: ["status"],
  data() {
    return {
      contactsshow: false,
      indexshow:false,
      ManShow:false,
      ordershow:false,
      orderlistshow:false,
      hasMsg:true,  
    };
  },
  created() {
    if(this.userinfo){
      this.hasMsg = true;
    }else{
      this.hasMsg = false;
    }
  },
  computed: {
    userinfo(){
      return localStorage.userinfo?JSON.parse(localStorage.userinfo):null
    }
  },
  methods: {
    goLogin(){
      this.$router.push({
        path:'/login'
      });
    },
  }
};
</script>
